#!/bin/bash
# usage: testjava CLASS
# should be run from the directory private/test_to_execute/<unique random hash>
#
# test configuration variables:
#
OUTPUT_FILE=test.out
PYTHON_ARGS=""
#
#
mkdir out 2> /dev/null
chgrp testovac out
chmod g+rwx out
chgrp testovac .
chmod g+r .
#
echo "<pre>" > $OUTPUT_FILE
#
echo "<br />Running:<br />" >> $OUTPUT_FILE
cp -r * out 2> /dev/null
rm -f out/$OUTPUT_FILE 2> /dev/null
chgrp testovac out/*
cd out
echo "------------------------Testing with Test$1...<br />" >> $OUTPUT_FILE
sudo -u testovac /opt/lampp/htdocs/list-svn/dev/test_scripts/testpython2 $1 >> ../$OUTPUT_FILE 2>> ../$OUTPUT_FILE
cd .. ;
#
rm -rf out 2>/dev/null
echo "------------------------Done.<br />" >> $OUTPUT_FILE
echo "</pre>" >> $OUTPUT_FILE
